﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Thor.Domain.Configuration;

namespace Thor.Silverlight.Views
{
    public partial class NewAdministrator : ChildWindow
    {
        public NewAdministrator()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(NewAdministrator_Loaded);
        }

        private void NewAdministrator_Loaded(object sender, RoutedEventArgs e)
        {
            this.AdministratorAccount = new AdministratorAccount();
            this.newAdministratorForm.CurrentItem = this.AdministratorAccount;
        }

        public AdministratorAccount AdministratorAccount { get; set; }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.newAdministratorForm.CommitEdit();
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }
    }
}

